package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.dao.impl.UserDaoImpl;
import com.itheima.domain.User;
import com.itheima.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDao ud=new UserDaoImpl();
    @Override
    public List<User> findAll() {

        return ud.findAll();
    }

    @Override
    public void addUser(User user) {
        ud.addUser(user);
    }

    @Override
    public User findById(String id) {
        return ud.findById(id);
    }

    @Override
    public void updateUser(User user) {
        ud.updateUser(user);
    }

    @Override
    public void deleteUser(String id) {
        ud.deleteUser(id);
    }
}
